package com.bigShen.pattern.strategy.pay.fact;

import com.bigShen.pattern.strategy.pay.PayState;
import com.bigShen.pattern.strategy.pay.impl.AliPay;
import com.bigShen.pattern.strategy.pay.impl.JDpay;
import com.bigShen.pattern.strategy.pay.impl.WeChatPay;

/**
 * @author: lei.shen
 * @date: 2018/10/5
 */
public class PayFactory extends AbstractPayFactory {

    @Override
    public PayState payByALi(String orderId, double amount) {
        return new AliPay().pay(orderId, amount);
    }

    @Override
    public PayState payByJD(String orderId, double amount) {
        return new JDpay().pay(orderId, amount);
    }

    @Override
    public PayState payByWeChat(String orderId, double amount) {
        return new WeChatPay().pay(orderId, amount);
    }

}
